            <div id="content"> <!-- Content begins here -->
                
                <?php echo $this->element('admin/flash') ?>
                <div class="clear"></div>
                <h2>Images</h2>
                <div class="clear"></div>
                <br />
                
                <?php if($posts): ?>
                <fieldset class="medias">
                    <div class="media_sort">
                <?php
                    foreach($posts as $row):
                    $item=$row["Media"];
                    
                ?>
                <div class="media_item">
                            <input class="tmp_media_id" name="data[Media][id]" type="hidden" value="<?php echo $item['id'] ?>"/>
                            <a class="del" href="<?php echo $html->url('/admin/media/delete_media/').$item['id'] ?>" title="click here to delete this media" onclick="return confirm('Are you sure?')"></a>
                            <a class="edit" href="<?php echo $html->url('/admin/media/index/').$media_type.'/'.$foreign_key_id.'/'.$item['id'] ?>" title="click here to edit this media"></a>
                            <!--<a class="move" href=":javascript" title="click here to drag and move"></a>-->
                            <a rel="mediaimage" href="<?php echo $html->url('/img/uploads/').$item['file_media'] ?>" >
                                <img src="<?php echo $html->url('/img/uploads/').$item['file_media'] ?>" alt="" width="100" height="100"/>
                            </a>    
                        </div>
                
                <?php endforeach;
                    
                ?>
                </div>
                </fieldset>
                
                <?php 
            
                $paginator->options(array('url'=>$this->passedArgs));
                
                    
                    echo '<div class="paginator">';
                                
                    if($paginator->hasPrev()) echo $paginator->prev('Previous', array('class'=>'next page-numbers', 'escape' => false));
                    echo $paginator->numbers(
                        array(
                            'class' => 'page-numbers', 
                            'separator' => ' ', 
                            'before' => ' ',
                            'after' => ' ',
                        )
                    );
                    if($paginator->hasNext()) echo $paginator->next('Next', array('class'=>'next page-numbers', 'escape' => false));
                    echo '</div>';
                    echo '<span class="displaying-num fR" style="margin:18px">'.$paginator->counter(array(
                        'format' => __('Displaying %start%&ndash;%end% of %count%', true)
                    )).'</span>';
                    
                ?>
                
                <a href="javascript:" class="btn hidden mediaOrder"><b>Update Order</b></a>        
                <img src="<?php echo $this->base?>/css/admin/assets/loading.gif" alt=""  class="mt10 ml10 hide" id="loading"/>
                <input id="ajax_path" value="<?php echo $html->url('/admin/media/update_order') ?>" type="hidden"/>
                <br clear="all" />
                <?php endif ?>
                
                <?php echo $this->element('forms/media_add') ?>
                
               

            
        </div> <!-- END Content -->
        